home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2006 May
/
PCWMAY06.iso
/
Software
/
Resources
/
PaperCut Quota 6.1
/
pc-setup.exe
/
{app}
/
WebAdmin
/
ChargeRates.asp
< prev
next >
Wrap
Text File
|
2005-10-13
|
4KB
|
139 lines
<%@ Language=VBScript %>
<%' (c) Copyright 1999-2005 PaperCut Software Pty. Ltd. %>
<!--#include file="includes/PCCommon.inc" -->
<!--#include file="includes/header.inc" -->
<H1><%= GetText("ChargeRates")%></H1>
<H2><%= GetText("PrinterCosts")%></H2>
<table width="90%" align="center" class="webAdmin">
<tr>
<th><%= GetText("Printer") %></th>
<th><%= GetText("PageCost") %></th>
<th><%= GetText("GrayscaleDiscount") %></th>
<th><%= GetText("DuplexDiscount") %></th>
<th><%= GetText("Details") %></th>
</tr>
<%
Dim objCharges
Set objCharges = Server.CreateObject("PCWebAdmin.clsCharges")
objCharges.TranslationExtraPerPage = GetText("ExtraPerPage")
objCharges.TranslationLessPerPage = GetText("LessPerPage")
objCharges.TranslationExtra = GetText("Extra")
objCharges.TranslationLess = GetText("Less")
objCharges.TranslationPerMetre2 = GetText("PerMetre2")
objCharges.TranslationPerFoot2 = GetText("PerFoot2")
objCharges.TranslationPerPage = GetText("PerPage")
Function GetCostValue(objPrinter)
If objPrinter.strAreaCost <> "" Then
GetCostValue = objPrinter.strAreaCost
ElseIf objPrinter.strPageSizeDefaultColor <> "" Then
GetCostValue = GetText("Advanced")
Else
GetCostValue = objPrinter.strCost
End If
End Function
Function GetOtherCostValue(objPrinter)
If objPrinter.strPageSizeDefaultColor <> "" then
GetOtherCostValue = GetPageSizeOtherCostValue(objPrinter)
ElseIf objPrinter.strVeryLargePageSurplus <> "" Then
GetOtherCostValue = "<table class=""printOtherCosts""><th>" & GetText("LargePaper") & ":</th><td>" & objPrinter.strLargePageSurplus & "</td></tr>" _
& "<tr><th>" & GetText("VeryLargePaper") & ":</th><td>" & objPrinter.strVeryLargePageSurplus _
& "</td></tr></table>"
end if
End Function
Function GetPageSizeOtherCostValue(objPrinter)
Dim s
s = s & "<table class=""printOtherCosts"">"
s = s & "<tr><th>" & GetText("Size") & "</th><th>" & GetText("GrayscaleCost") & "</th><th>" & GetText("ColorCost") & "</th></tr>"
Dim strPageSize
For Each strPageSize in objPrinter.colPageSizes
s = s & "<tr><td>" & strPageSize & "</td><td>" & objPrinter.dctPageSizeGrayscaleCosts(strPageSize) & "</td><td>" & objPrinter.dctPageSizeColorCosts(strPageSize) & "</td></tr>"
Next
s = s & "</table><br/>"
s = s & "<table class=""printOtherCosts"">"
s = s & "<tr><th>" & GetText("DefaultGrayscaleCost") & ":</th><td>" & objPrinter.strPageSizeDefaultGrayscale & "</td></tr>"
s = s & "<tr><th>" & GetText("DefaultColorCost") & ":</th><td>" & objPrinter.strPageSizeDefaultColor & "</td></tr>"
s = s & "</table>"
GetPageSizeOtherCostValue = s
End Function
Dim colPrinters
Dim objPrinter
Dim lngRow
Set colPrinters = objCharges.GetPrinters()
lngRow = 0
For Each objPrinter in colPrinters
%>
<tr class="<%=RowClassHelper(lngRow)%>">
<td><%=objPrinter.strPrinterName%></td>
<td><%=GetCostValue(objPrinter)%></td>
<td><%=objPrinter.strGrayscaleDiscount%></td>
<td><%=objPrinter.strDuplexDiscount%></td>
<td><%=GetOtherCostValue(objPrinter)%></td>
</tr>
<%
lngRow = lngRow + 1
Next
Set colPrinters = Nothing
Set objPrinter = Nothing
%>
</table>
<br/>
<br/>
<% If gblnHasNetCharging Then %>
<h2><%=GetText("NetCosts")%></h2>
<table style="margin-left: 40px;" cellpadding="4px">
<tr>
<th><%=GetText("NetChargingType")%>: </th>
<td><%
If objCharges.NetChargeMethod = "MB" Then
Response.Write GetText("DataUsed")
Else
Response.Write GetText("TimeUsed")
End If
%>
</td>
</tr>
<tr>
<th><%=GetText("Cost")%>: </th>
<td><%
If objCharges.NetChargeMethod = "MB" Then
Response.Write GetTextReplace("DataCost", Array(FormatCredit(objCharges.NetCostPerMB)))
Else
Response.Write GetTextReplace("TimeCost", Array(FormatCredit(objCharges.NetCostPerPeriod), objCharges.NetPeriodMins))
End If
%>
</td>
</tr>
</table>
<% End If %>
<!--#include file="includes/footer.inc" -->